package gui;

import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;

import javax.swing.JPanel;

public class VideoPanel extends JPanel{

	public Image img = null;
	private int width,height;
	
	public VideoPanel(int w,int h){
		width = w;
		height = h;
	}
	public void paint(Graphics g) {

	      super.paint(g);
	      // the size of the component
	      Dimension d = getSize();
	      // the internal margins of the component
	      // draw to fill the entire component
	      g.drawImage(img, 0, 0, width, height, this);
	      refresh();   
	   }
	   private void refresh(){
		   setVisible(false);
		   setVisible(true);
	   }
}
